Skip to content

Conversation

@zauonlok
Copy link
Contributor

@zauonlok zauonlok commented May 28, 2017

Indices are accumulated twice, which may cause IndexError.

>>> import torchvision.datasets as dset
>>> lsun = dset.LSUN('/path/to/lsun', classes=['bedroom_val', 'bridge_val', 'church_outdoor_val', 'classroom_val'])
>>> len(lsun)
1200
>>> lsun[1100]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<prefix>/lib/python2.7/site-packages/torchvision-0.1.8-py2.7.egg/torchvision/datasets/lsun.py", line 125, in __getitem__
  File "<prefix>/lib/python2.7/site-packages/torchvision-0.1.8-py2.7.egg/torchvision/datasets/lsun.py", line 37, in __getitem__
IndexError: list index out of range

@soumith soumith merged commit 83263d8 into pytorch:master May 28, 2017
@soumith
Copy link
Contributor

soumith commented May 28, 2017

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants